/**
* @title: 首页
* @description:
* @author JUN
*/
<template>
	<view class="home">
		
		<view>
			<!-- 轮播图 -->
			<swiper class="swiper"></swiper>

			<!-- 签约 -->
			<sign v-if="enterprise.type === 1" ref="sign"></sign>
			
			<!-- 未签约 -->
			<un-sign v-else ref="sign"></un-sign>
		</view>
		
		<!-- 底部菜单栏 -->
		<tab-bar></tab-bar>
	</view>
</template>

<script>
	// 引入组件
	import sign from "./component/sign/sign.vue" //签约页面
	import unSign from "./component/unsign/unSign.vue" //未签约页面
	import swiper from "./component/swiper.vue" // 轮播图

	import {
		createNamespacedHelpers
	} from 'vuex'
	const {
		mapState,
		mapMutations
	} = createNamespacedHelpers('userModule')

	export default {
		computed: {
			...mapState(["enterprise"])
		},
		components: {
			sign,
			unSign,
			swiper,
		},
		onPullDownRefresh(){//下拉刷新
			this.$refs.sign.getList()
		}
	}
</script>

<style lang="scss" scoped>
	.home {
		padding-bottom: 100rpx;
		.swiper{
			height: auto;
		}
		.loading {
			width: 100%;
			height: 100vh;
			background-color: #FFFFFF;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}
</style>
